/*
 * Copyright (c) 2018. Xi'an iRain IOT Technology service CO., Ltd (ShenZhen). All Rights Reserved.
 */

package com.parkingwang.vehiclekeyboard.demo.keyboard


/**
 * 键盘回调
 *
 * @author 黄浩杭 (huanghaohang@parkingwang.com)
 * @version 1.13-hotfix-2
 * @since 1.13
 */
abstract class KeyboardCallback {
    /**
     * 键盘将显示或隐藏时的回调
     *
     * @param isHidden 当前键盘是否要被隐藏。
     */
    open fun onKeyboardHiddenChanged(isHidden: Boolean) {}

    /**
     * 键盘号码修改后的回调
     *
     * @param isCompleted 是否输入完成
     * @param number      当前已输入的号码
     */
    open fun onKeyboardChanged(isCompleted: Boolean, number: String) {}

    /**
     * 键盘输入完成的回调
     *
     * @param number 输入完成的车牌号码
     */
    abstract fun onKeyboardCompleted(number: String)

    internal fun onKeyboardMessage(message: String) {
        //ToastProxy.text(message)
    }
}